package com.zealfi.wk.stream.core;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.cloud.stream.annotation.EnableBinding;
import org.springframework.cloud.stream.annotation.StreamListener;
import org.springframework.messaging.handler.annotation.SendTo;

/**
 * Created by kuan at 2018-05-14 下午 5:35
 */
@EnableBinding(AppProcessor.class)
public class App1 {
    private static final Logger logger = LoggerFactory.getLogger(App1.class);

    @StreamListener(AppProcessor.INPUT)
    @SendTo(AppProcessor.OUTPUT)
    public Object receiveFromInput(Object payload) {
        logger.info("App1 Received:" + payload);

        return "From Input channel Return - " + payload;
    }
}
